/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package application.beans;

import java.util.Date;

/**
 *
 * @author Étienne
 */
public class MessageBean {
    Integer idMessage;
    String message;
    Date date;
    CompteBean compte;

    public CompteBean getCompte() {
        return compte;
    }

    public void setCompte(CompteBean compte) {
        this.compte = compte;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Integer getIdMessage() {
        return idMessage;
    }

    public void setIdMessage(Integer idMessage) {
        this.idMessage = idMessage;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public MessageBean() {
    }

    public MessageBean(Integer idMessage, String message, Date date, CompteBean compte) {
        this.idMessage = idMessage;
        this.message = message;
        this.date = date;
        this.compte = compte;
    }
    
    @Override
    public boolean equals(Object obj) 
    {
        if(((MessageBean)obj).idMessage == this.idMessage)
            return true;
        else
            return false;
    }
}
